package com.maimao.order.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.model.info.IntegralAction;
import com.maimao.model.info.input.UseCouponInput;
import com.maimao.order.client.factory.CouponFallBackFactory;
import com.maimao.order.client.factory.IntegralActionFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2021/1/15 2:16 下午
 */
@RequestMapping("/info/integral-action")
@FeignClient(contextId = "integralActionClient", value = ServiceContainer.INFO_SERVICE, fallbackFactory = IntegralActionFallBackFactory.class, configuration = FeignInterceptor.class)
public interface IntegralActionClient {

    /**
     * 批量保存积分日志
     */
    @PostMapping("/client/addBatch")
    public Result<Void> saveBatch(@RequestBody List<IntegralAction> integralActionList);
}
